/*
* pps_bom
*/
package com.pitop.assembly.api;

import com.pitop.assembly.entity.AssemblyCategory;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 组件类型 api请求熔断器
 *
 * @author berton
 */
@FeignClient(value = "pps-cloud-provider", fallback = AssemblyCategoryFeignApiImpl.class)
public interface AssemblyCategoryFeignApi {
    /**
     * 查询AssemblyCategory一个详情信息
     *
     * @param id
     * @param code 编码
     * @return AssemblyCategory
     */
    @GetMapping(value = "/assemblyCategory/load")
    AssemblyCategory load(@RequestParam("id") Long id, @RequestParam("code") String code);

    /**
     * 查询AssemblyCategory一个详情信息
     *
     * @param id
     * @param code 编码
     * @return AssemblyCategory
     */
    @GetMapping(value = "/assemblyCategory/get")
    AssemblyCategory get(@RequestParam("id") Long id, @RequestParam("code") String code);

    /**
     * 根据条件id查询AssemblyCategory一个详情信息
     *
     * @param id
     * @return AssemblyCategory
     */
    @GetMapping(value = "/assemblyCategory/load/id/{id}")
    AssemblyCategory loadById(@RequestParam("id") Long id);

    /**
     * 根据条件code查询AssemblyCategory一个详情信息
     *
     * @param code 编码
     * @return AssemblyCategory
     */
    @GetMapping(value = "/assemblyCategory/load/code/{code}")
    AssemblyCategory loadByCode(@RequestParam("code") String code);

    /**
     * 根据条件name查询AssemblyCategory一个详情信息
     *
     * @param name 名称
     * @return AssemblyCategory
     */
    @GetMapping(value = "/assemblyCategory/load/name/{name}")
    AssemblyCategory loadByName(@RequestParam("name") String name);

    /**
     * 根据条件id查询AssemblyCategory一个详情信息
     *
     * @param id
     * @return AssemblyCategory
     */
    @GetMapping(value = "/assemblyCategory/get/id/{id}")
    AssemblyCategory getById(@RequestParam("id") Long id);

    /**
     * 根据条件code查询AssemblyCategory一个详情信息
     *
     * @param code 编码
     * @return AssemblyCategory
     */
    @GetMapping(value = "/assemblyCategory/get/code/{code}")
    AssemblyCategory getByCode(@RequestParam("code") String code);

    /**
     * 删除AssemblyCategory
     */
    @DeleteMapping("/assemblyCategory/delete")
    void delete(@RequestParam("id") Long id, @RequestParam("code") String code);


    /**
     * 查询AssemblyCategory信息集合
     *
     * @return 分页对象
     */
    @PostMapping(value = "/assemblyCategory/list")
    List<AssemblyCategory> list(@RequestBody AssemblyCategory assemblyCategory, @RequestParam("isShowAll") String isShowAll, @RequestParam("curPage") int curPage, @RequestParam("pageSize") int pageSize);


    /**
     * 查询AssemblyCategory信息集合
     *
     * @return 分页对象
     */
    @GetMapping(value = "/assemblyCategory/list/by")
    List<AssemblyCategory> listByPk(@RequestParam("id") Long id, @RequestParam("code") String code, @RequestParam("curPage") int curPage, @RequestParam("pageSize") int pageSize);


    /**
     * 统计AssemblyCategory信息数量根据主键
     *
     * @return 总条数
     */
    @GetMapping(value = "/assemblyCategory/count/by")
    Integer count(@RequestParam("id") Long id, @RequestParam("code") String code);

    /**
     * 统计AssemblyCategory信息数量
     *
     * @return 总条数
     */
    @PostMapping(value = "/assemblyCategory/count")
    Integer count(@RequestBody AssemblyCategory assemblyCategory);


    /**
     * 创建AssemblyCategory
     *
     * @return AssemblyCategory
     */
    @PostMapping("/assemblyCategory/build")
    AssemblyCategory build(@RequestBody AssemblyCategory assemblyCategory);


    /**
     * 修改AssemblyCategory
     *
     * @return AssemblyCategory
     */
    @PutMapping("/assemblyCategory/modify")
    AssemblyCategory modify(@RequestBody AssemblyCategory assemblyCategory);

    /**
     * 修改组件类型状态
     *
     * @return AssemblyCategory
     */
    @PutMapping("/assemblyCategory/updateState")
    AssemblyCategory updateState(@RequestParam("code") String code, @RequestParam("state") String state);


}
